import { useAccount } from "@/stores/account";
import { useCommentAppoint, useCommentBatch, useCommentLoop } from "@/stores/comment";
import { useSession } from "@/stores/sesstion";
import { defineComponent, ref } from "vue";
import styles from './styles.module.css';


export default defineComponent({
    setup(_props, _ctx) {
        const batchStores = useCommentBatch();
        return () => {
            return (
                <div >
                    <el-row class={styles.inputBox}>
                        <el-col span={5} class={styles.inputText}>批量发言内容:</el-col>
                        <el-col span={19} class={styles.text}><el-input placeholder="请输入发言内容" size="small" v-model={batchStores.content}></el-input></el-col>
                    </el-row>
                    <el-row class={styles.inputBox}>
                        <el-col span={3} class={styles.inputText}>随机选择:</el-col>
                        <el-col span={4}><el-input-number style="width:100%;" max={10} min={1} v-model={batchStores.quantity} size="small" step={1} step-strictly></el-input-number></el-col>
                        <el-col span={3} class={styles.inputText}>&nbsp;&nbsp;个账号</el-col>
                        <el-col span={2} class={styles.inputText}>间隔:</el-col>
                        <el-col span={4}><el-input-number max={10} min={1} style="width:100%;" v-model={batchStores.time} size="small" step={1} step-strictly></el-input-number></el-col>
                        <el-col span={3} class={styles.inputText}>&nbsp;&nbsp;秒</el-col>
                        <el-col span={5}><el-button size="small" type="primary" onClick={() => {
                            if (batchStores.isRun) {
                                batchStores.stop();
                            } else {
                                batchStores.start();
                            }

                        }}>{
                                batchStores.isRun ? '停止发言' : '批量发言'
                            }</el-button></el-col>
                    </el-row>
                </div>

            );
        }
    },
});
